#!/usr/bin/python3
# -*- coding: utf-8 -*-
# @Time : 2021/9/12 22:32
# @Author : lenovo
# @Email : 26541796406@qq.com
# @File : log_page.py
# @Project : crm
"""日志信息页面"""
from selenium.webdriver.common.by import By
from page.base_page import BasePage
from utils.util import HS3
class Log(BasePage):
    """日志首页类，一系列元素，以及操作"""
    url = "{}/crm3/index.php?m=log".format(HS3)
    """定义定位器"""
    add_log_locator = (By.XPATH,'/html/body/div[5]/div[2]/div[2]/div/a')  # 新建日志按钮
    amend_log_locator = (By.LINK_TEXT,'修改')   # 修改日志
    """具体操作"""
    def add_log(self):
        """点击新建日志"""
        self.driver.find_element(*self.add_log_locator).click()
    def amend_log(self):
        """点击修改日志"""
        self.driver.find_element(*self.amend_log_locator).click()
